package com.siss.tenancy.vo;

import java.util.List;

/**
 * 表格列表VO
 *
 * @author ygw
 * @create 2017-07-11 14:49
 */
public class TableResult<T> {
    int total;
    List<T> data;

    public TableResult(int total, List<T> data) {
        this.total = total;
        this.data = data;
    }

    public TableResult(List<T> data) {
    	this.total = data.size();
        this.data = data;
    }

    public TableResult<T> total(int total){
        this.total = total;
        return this;
    }
    public TableResult<T> total(List<T> data){
        this.data = data;
        return this;
    }

    public TableResult(){

    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
